<template>
	<view class="icon_box">
		<image :src="src" :style="initStyle(size)" ></image>
	</view>
</template>

<script setup>
	import { ref ,reactive, onMounted} from "vue"
	const style = ref('')
	const props = defineProps({
		size:{
			type: String
		},
		src:{
			type:String
		}
	})
	
	//生成样式
	const initStyle =(size)=>{
		return `width: ${size}; height: ${size};`
	}
	
</script>

<style lang="less">
	.icon_box{
		margin: 4rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>
